package club.cearnach.api.dao;

import club.cearnach.entity.News;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

/**
 * @author 阮胜
 * @date 2018/5/17 14:43
 */
public interface INewsDao extends JpaRepository<News,Integer> {
    Page<News> findAllByOrderByCreateDateDesc(Pageable pageable);

    News findTop1ByOrderByCreateDateDesc();
}
